﻿@ModelType IEnumerable(Of HSPelections.Models.VoteNum)

@Code
    ViewData("Title") = "Index"
End Code

<h2>Index</h2>

<p>
    @Html.ActionLink("Vote Now","MakeVote4")

    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayName(" ")
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.President)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.VicePresident)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.Secretary)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.Treasurer)
        </th>
        <th>
            @Html.DisplayNameFor(Function(model) model.SergeantAtArms)
        </th>
        <th></th>
    </tr>

@For Each item In Model
    Dim currentItem = item
    @<tr>
        <th>
            @If currentItem.VoteNumId = 1 Then
                    @Html.DisplayName("Everett:")
            ElseIf currentItem.VoteNumId = 2 Then
                @Html.DisplayName("Rebecca Gowen:")
            ElseIf currentItem.VoteNumId = 3 Then
                @Html.DisplayName("Rebecca Peek:")
            ElseIf currentItem.VoteNumId = 4 Then
                @Html.DisplayName("Chris Camic:")
            ElseIf currentItem.VoteNumId = 5 Then
                @Html.DisplayName("Garret:")
            End If
       
        </th>
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.President)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.VicePresident)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.Secretary)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.Treasurer)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.SergeantAtArms)
        </td>

    </tr>
Next

</table>
